package com.caipos.mqtt.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
public class SensorLastData implements Serializable {
    private static final long serialVersionUID = -1;
    @JSONField(name="stationcode")
    private String stationcode;

    @JSONField(name="sendrate")
    private Integer interval;

    @JSONField(name="sensorcode")
    private String sensorcode;
    @JSONField(name="senval")
    private Double senval;
    @JSONField(name="sensortype")
    private Integer sensortype;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(name="thattime")
    private Date thattime;

    @JSONField(name="id")
    private String id;
    @JSONField(name="val_max")
    private Double val_max;
    @JSONField(name="val_sum")
    private Double val_sum;
    @JSONField(name="val_last")
    private Double val_last;
    @JSONField(name="val_min")
    private Double val_min;
    @JSONField(name="val_aver")
    private Double val_aver;
    @JSONField(name="sensor_ch")
    private Integer sensor_ch;



}
